home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- X-Newsreader: UMSZCo V1.1 BETA 12 (23.2.96)
- Mime-version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-encoding: 8BIT
- Path: news.tng.oche.de!tomate.tng.oche.de
- X-Gateway: ZCONNECT UE utomate.tng.oche.de.tomate.tng.oche.de [PolyNet zTOr V4.901 Serie: "light"]
- Subject: simple K&R ANSI-C examples won't compile under SAS/C
- Date: Fri, 1 Mar 96 23:27:15 GMT
- Message-ID: <68771782@0humpty.tomate.tng.oche.de>
- From: humpty@TOMATE.TNG.OCHE.DE (Andreas Mixich)
-
-
- Hi,
-
- this little example form the 'Kernighan&Ritchie' won't compile:
-
- #include <stdio.h>
- #include <clib/alib_stdio_protos.h>
-
- main()
- {
- int c;
-
- while((c = GetChar()) !=EOF)
- PutChar(c);
- }
-
- Yes, *you* laugh now, but for me this is really strange.
-
- I get an error #72 in alib_stdio_protos.h; conflict with previous declaration,
- see file stdio.h.
-
- Now, I have read the guide on this error, but if I leave out the
- alib_stdio_protos.h, this will cause the error, no Prototype for function
- getchar() (or so).
-
- Also, if I do a c = GetChar(void) (as synopsis description in sclib.guide
- shows) the error still ocuures.
-
- If someone could point me to the page in the SAS manual where I can find
- an, explanation (I have read the errors and warnings section, but it is
- very similare to the guide's text) or could tell me what I am doing wrong.
- I can't continue my C-course as long I have no solution for this.
-
- --
- Ciao, Andreas
- Internet: humpty@tomate.tng.oche.de
- FIDO : 2:244/1544.14
-
- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=++=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
- No program done by an undergrad will work after she graduates.
-
-